﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace SwitchHostProject.Command
{
    internal class HostCommand : ICommand
    {
        public event EventHandler? CanExecuteChanged;

        public Action<object?>? ExecuteAction { get; set; }

        public HostCommand(Action<object?> executeAction)
        {
            ExecuteAction = executeAction;
        }
        public bool CanExecute(object? parameter)
        {
            return true;
        }


        public void Execute(object? parameter)
        {
            ExecuteAction?.Invoke(parameter);
        }
    }
}
